package com.cys.dm.client.scheduler;

import com.cys.dm.entity.scheduler.DmSchedulerSeat;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author blue_t
 * @date 2020-12-23 9:38
 */
@FeignClient(name = "dm-scheduler-provider")
@Component
public interface DmSchedulerSeatClient {
    @PostMapping(path = {"/findSchedulerSeatBySchedulerId/{scheduleId}"})
    public List<DmSchedulerSeat> findSchedulerSeatBySchedulerId(@PathVariable("scheduleId")Long scheduleId);

    @PostMapping(path = "/findScheduleSeatByIDAndX/{id}")
    public Integer findScheduleSeatByIDAndX(@PathVariable("id") Long id);

    @PostMapping(path = "/findScheduleSeatByIDAndY/{id}")
    public Integer findScheduleSeatByIDAndY(@PathVariable("id") Long id);

    @PostMapping(path = {"/findSchedulerSeatByIdAndXAndY/{id}/{x}/{y}"})
    public DmSchedulerSeat findSchedulerSeatByIdAndXAndY(@PathVariable("id")Long id,
                                                         @PathVariable("x")Integer x,
                                                         @PathVariable("y")Integer y);
    @PostMapping(path = "/updateSeatByXAndYAndScheduleId")
    public Integer updateSeatByXAndYAndScheduleId(@RequestBody DmSchedulerSeat dmSchedulerSeat);

    @PostMapping(path = {"/findSchedulerSeatByOrderNo/{orderNo}"})
    public List<DmSchedulerSeat> findSchedulerSeatByOrderNo(@PathVariable("orderNo")String orderNo);

    @PostMapping(path = {"updSeatStatus"})
    public Integer updSeatStatus(@RequestBody DmSchedulerSeat dmSchedulerSeat);
}
